# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=tree
pkgver=2.1.0
pkgrel=1
pkgdesc="A directory listing program displaying a depth indented list of files"
arch=('x86_64')
url="https://gitlab.com/OldManProgrammer/unix-tree"
license=('GPL')
depends=('glibc')
source=("https://gitlab.com/OldManProgrammer/unix-tree/-/archive/${pkgver}/unix-tree-${pkgver}.tar.gz")
sha512sums=('8e9c1e91d40a4719f99ac26b686e40a21d083b1d2b2a73b933e4b46056acddc63044ff50e24d827399d7118e41c7199891c204c180759de1e8f5e7c658866a39')

prepare() {
  cd "unix-tree-${pkgver}"
  sed -i -e '/^CFLAGS/d' -e '/^LDFLAGS/d' Makefile
}

build() {
  cd "unix-tree-${pkgver}"
  make
}

package() {
  cd "unix-tree-${pkgver}"
  make PREFIX="${pkgdir}/usr" MANDIR="${pkgdir}/usr/share/man" install
}
